﻿using GalaSoft.MvvmLight.Command;
using NicoView.Model.Platform.MediaEncoders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NicoView.ViewModel.Platform
{
    public class NicoViewNiconicoLiveEncoderViewModel:NicoViewViewModelBase
    {
        public bool NiconicoLiveEncoderInstalled
        {
            get
            {

                return NiconicoLiveEncoderProvider.NiconicoLiveEncoderInsalled;
            }
        }

        private RelayCommand getNiconicoLiveEncoderCommand;

        /// <summary>
        /// NLE取得コマンド
        /// </summary>
        public RelayCommand GetNiconicoLiveEncoderCommand
        {
            get
            {
                return getNiconicoLiveEncoderCommand ?? (getNiconicoLiveEncoderCommand = new RelayCommand(
                    executeGetNiconicoLiveEncoderCommand,
                    canExecuteGetNiconicoLiveEncoderCommand));
            }
        }

        private void executeGetNiconicoLiveEncoderCommand()
        {
            this.InternalApplication.ExecuteUrl("http://live.nicovideo.jp/encoder/");
        }

        private bool canExecuteGetNiconicoLiveEncoderCommand()
        {
            return true;
        }
    }
}
